I am writing my code in Replit. And it gives me the following error " Property 'fbAsyncInit' does not exist on type 'Window & typeof globalThis' ". For this code:
window.fbAsyncInit = function() {
FB.init({
appId : '*************',
cookie : true, // Enable cookies to allow the server to access the session.
xfbml : true, // Parse social plugins on this webpage.
version : 'v13.0' // Use this Graph API version for this call.
});
FB.getLoginStatus(function(response) {
// Called after the JS SDK has been initialized.
statusChangeCallback(response); // Returns the login status.
});
};
But when I run this code in my VS code it doesn't give me any error.
Why is this happening? Thanks in advance.